package com.ssish.saas.eccs.mapper;

import com.ssish.saas.eccs.model.PlanCondition;
import com.ssish.saas.eccs.model.PlanConditionExample;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface PlanConditionMapper {
    long countByExample(PlanConditionExample example);

    int deleteByExample(PlanConditionExample example);

    @Insert({
        "insert into PLAN_CONDITION (PLAN_CODE, CORP_CODE, ",
        "LIMIT_CODE, FREQUENCY_CODE, ",
        "PROVIDER_TYPE, INVOICE_TYPE, ",
        "COUNTRY, START_DATE, ",
        "SNO, END_DATE, ",
        "LASTEDIT_DATE, USER_CODE, ",
        "ACTIVE_FLAG, MIN_VALUE, ",
        "MAX_VALUE, DEPENDENT_MAX_VALUE, ",
        "FAMILY_MAX_VALUE, CONDITION_TYPE, ",
        "ATTACH_CODE, PRINT_VALUE, ",
        "REJECT_CODE, IFCOND_TYPE, ",
        "IFCOND_GEVAL, IFCOND_LEVAL, ",
        "IFCOND_DEDUCTIBLE, IFCOND_COINSRMINCAP, ",
        "IFCOND_COINSRCAP, IFCOND_COINSRCAP_FREQUENCY, ",
        "IFCOND_EXCESS_COINSRCAP_MAXVAL, ANDCOND_TYPE, ",
        "ANDCOND_GEVAL, ANDCOND_LEVAL, ",
        "ELSECOND_MAX_VALUE, ELSECOND_DEPENDENT_MAX_VALUE, ",
        "ELSECOND_FAMILY_MAX_VALUE, ELSECOND_COINSRMINCAP, ",
        "ELSECOND_COINSRCAP)",
        "values (#{planCode,jdbcType=VARCHAR}, #{corpCode,jdbcType=VARCHAR}, ",
        "#{limitCode,jdbcType=VARCHAR}, #{frequencyCode,jdbcType=DECIMAL}, ",
        "#{providerType,jdbcType=VARCHAR}, #{invoiceType,jdbcType=CHAR}, ",
        "#{country,jdbcType=VARCHAR}, #{startDate,jdbcType=TIMESTAMP}, ",
        "#{sno,jdbcType=DECIMAL}, #{endDate,jdbcType=TIMESTAMP}, ",
        "#{lasteditDate,jdbcType=TIMESTAMP}, #{userCode,jdbcType=VARCHAR}, ",
        "#{activeFlag,jdbcType=CHAR}, #{minValue,jdbcType=DECIMAL}, ",
        "#{maxValue,jdbcType=DECIMAL}, #{dependentMaxValue,jdbcType=DECIMAL}, ",
        "#{familyMaxValue,jdbcType=DECIMAL}, #{conditionType,jdbcType=DECIMAL}, ",
        "#{attachCode,jdbcType=VARCHAR}, #{printValue,jdbcType=CHAR}, ",
        "#{rejectCode,jdbcType=DECIMAL}, #{ifcondType,jdbcType=VARCHAR}, ",
        "#{ifcondGeval,jdbcType=DECIMAL}, #{ifcondLeval,jdbcType=DECIMAL}, ",
        "#{ifcondDeductible,jdbcType=DECIMAL}, #{ifcondCoinsrmincap,jdbcType=DECIMAL}, ",
        "#{ifcondCoinsrcap,jdbcType=DECIMAL}, #{ifcondCoinsrcapFrequency,jdbcType=DECIMAL}, ",
        "#{ifcondExcessCoinsrcapMaxval,jdbcType=DECIMAL}, #{andcondType,jdbcType=VARCHAR}, ",
        "#{andcondGeval,jdbcType=DECIMAL}, #{andcondLeval,jdbcType=DECIMAL}, ",
        "#{elsecondMaxValue,jdbcType=DECIMAL}, #{elsecondDependentMaxValue,jdbcType=DECIMAL}, ",
        "#{elsecondFamilyMaxValue,jdbcType=DECIMAL}, #{elsecondCoinsrmincap,jdbcType=DECIMAL}, ",
        "#{elsecondCoinsrcap,jdbcType=DECIMAL})"
    })
    int insert(PlanCondition record);

    int insertSelective(PlanCondition record);

    List<PlanCondition> selectByExample(PlanConditionExample example);

    int updateByExampleSelective(@Param("record") PlanCondition record, @Param("example") PlanConditionExample example);

    int updateByExample(@Param("record") PlanCondition record, @Param("example") PlanConditionExample example);
}